# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=spglib
pkgver=1.10.4
pkgrel=1
pkgdesc="C library for finding and handling crystal symmetries"
arch=(x86_64)
url="https://atztogo.github.io/spglib/"
license=(custom)
depends=(glibc)
makedepends=()
source=($pkgname-$pkgver.tar.gz::"https://github.com/atztogo/spglib/archive/v$pkgver.tar.gz")
sha256sums=('6a15a324a821ad9d3e615e120d9c5e704e284d8eb1f076aa21741a23fbcf08df')

prepare() {
  cd $pkgname-$pkgver
  touch INSTALL NEWS README AUTHORS
  autoreconf -vi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 "$srcdir"/$pkgname-$pkgver/COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
